/**
 * MoveNotification.java
 * Created: 11.03.2011, 15:00:10
 */
package model;

import model.HexDirection;
import client.field.notification.MoveNotificationInterface;

/**
 * A counter notification used if a counter is moved.
 * Stores the information about the counter underneath if a bug is moved on top.
 * @author Jan-Philipp Kappmeier
 */
public class MoveNotification extends PieceNotification implements MoveNotificationInterface {
	/** The index of the counter that is already on the targe field, if any. (Used for stackable counters). */
	int below;

	/**
	 * 
	 * @param counterIndex the index of the counter that performs an action
	 * @param direction the direction of the target field starting at the anchor field
	 * @param anchorPiece the index on the counter on the anchor field.
	 * @param below the index of the counter that already occupies the target field. should be -1 if it is empty.
	 */
	public MoveNotification( int counterIndex, HexDirection direction, int anchorPiece, int below ) {
		super( counterIndex, direction, anchorPiece );
		this.below = below;
	}

	/**
	 * Returns the index of the piece on top of the target field, if any. If
	 * the target field is empty, -1 should be returned.
	 * @return the index of the piece on top of the target field or -1.
	 */
	public int getBelow() {
		return below;
	}
}
